﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Tile_Engine;

namespace AGrandVenture
{
    static class GameManager
    {
        #region declarations

        public static int XP = 0;
        public static int Health = 100;
        //public static int Energy = 100;
        public static int CurrentWave = 0;
        public static int BaseGeneratorCount = 8;
        public static int MaxGeneratorCount = 15;
        public static int CurrentGeneratorCount = 8;
        public static int PlayerLives = 3;
        public static Vector2 PlayerStartLoc = new Vector2(32, 32);

        #endregion

        #region Public Methods

        public static void StartNewWave()
        {
            CurrentWave++;
            if (CurrentGeneratorCount < MaxGeneratorCount)
            {
                CurrentGeneratorCount++;
            }

            Player.BaseSprite.WorldLocation = PlayerStartLoc;
            Camera.Position = Vector2.Zero;
            WeaponManager.CurrentWeaponType = WeaponManager.WeaponType.Normal;
            WeaponManager.Shots.Clear();
            WeaponManager.PowerUps.Clear();
            EffectsManager.Effects.Clear();
            EnemyManager.Enemies.Clear();
            //TileMap.GenerateRandomMap();
            //GoalManager.GenerateEnemyGenerators(CurrentGeneratorCount);
        }

        public static void StartNewGame()
        {
            CurrentWave = 0;
            XP = 0;
            PlayerLives = 3;
            StartNewWave();
        }

        public static void LostLife()
        {
            PlayerLives--;
        }
        #endregion


    }
}
